package com.example.mangodb.domain;

import lombok.*;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: 普发忠
 * @Date: 2021/09/18/11:55
 */
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@ToString
//设置文档所在的集合中具体的表名
@Document("users")
public class User {
    //@ID注解自动会转换成OBjectId
    @Id
    private String id ;
    private String name;
    private int age;
    private List<String>hobby=new ArrayList<>();
    
}
